package com.threeti.mecool.core.application.report;

import java.util.List;
import java.util.Map;

import com.threeti.mecool.core.domain.model.acl.User;

/**
 * 报表服务
 * 
 * 注意,在地理区域相关的报表中，如果某些位置未能正确在地图上显示，那么极有可能是位置关联(通过AD_ID/ADMIN_DIV_ID进行关联)
 * 的行政地域数据本身不准确或不精确
 * 
 * @author Jay Meng
 */
public interface ReportService {

	/**
	 * 门店开店率-全国摘要汇总报表(对全国所有省市进行摘要汇总并输出一条总计结果)
	 */
	StoreOpeningRate storeOpeningRateSummaryByCountry(StoreOpeningRateReportCriteria criteria);

	/**
	 * 门店开店率-全国各大区摘要汇总报表(根据自定义地理行政区域对该区域下属省市进行摘要汇总)
	 */
	List<StoreOpeningRate> storeOpeningRateSummaryByCustomAreas(StoreOpeningRateReportCriteria criteria);

	/**
	 * 门店开店率-特定大区的摘要汇总报表(根据自定义地理行政区域对该区域下属省市进行摘要汇总)
	 */
	List<StoreOpeningRate> storeOpeningRateSummaryByCustomArea(String customAreaCode, StoreOpeningRateReportCriteria criteria);

	/**
	 * 门店开店率-各省市摘要汇总报表(对全国所有省市进行摘要汇总)
	 */
	List<StoreOpeningRate> storeOpeningRateSummaryByProvinceALL(StoreOpeningRateReportCriteria criteria);

	/**
	 * 门店开店率-摘要汇总报表(按特定省市进行摘要汇总)
	 */
	List<StoreOpeningRate> storeOpeningRateSummaryByProvince(String provinceAdCode, StoreOpeningRateReportCriteria criteria);

	/**
	 * 门店开店率-摘要汇总报表(按特定城市进行摘要汇总)
	 */
	List<StoreOpeningRate> storeOpeningRateSummaryByCity(String cityAdCode,StoreOpeningRateReportCriteria criteria);

	/**
	 * (督导)任务执行率-全国摘要汇总报表(对全国所有省市进行摘要汇总并输出一条总计结果)
	 */
	TaskPerformanceRate taskPerformanceRateSummaryByCountry();

	/**
	 * (督导)任务执行率-全国各大区摘要汇总报表(根据自定义地理行政区域对该区域下属省市进行摘要汇总)
	 */
	List<TaskPerformanceRate> taskPerformanceRateSummaryByCustomAreas();

	/**
	 * (督导)任务执行率-特定大区的摘要汇总报表(根据自定义地理行政区域对该区域下属省市进行摘要汇总)
	 */
	List<TaskPerformanceRate> taskPerformanceRateSummaryByCustomArea(
			String customAreaCode);

	/**
	 * (督导)任务执行率-各省市摘要汇总报表(对全国所有省市进行摘要汇总)
	 * @param paramMap 
	 */
	List<TaskPerformanceRate> taskPerformanceRateSummaryByProvinceALL(Map<String, String> paramMap);

	/**
	 * (督导)任务执行率-摘要汇总报表(按特定省市进行摘要汇总)
	 */
	List<TaskPerformanceRate> taskPerformanceRateSummaryByProvince(String provinceAdCode);

	/**
	 * (督导)任务执行率-摘要汇总报表(按特定城市进行摘要汇总)
	 */
	List<TaskPerformanceRate> taskPerformanceRateSummaryByCity(String cityAdCode);

	/**
	 * (督导)巡店任务执行率-全国各大区摘要汇总报表(根据自定义地理行政区域对该区域下属省市进行摘要汇总)
	 */
	List<TaskPerformanceRate> storeVisitingTrackSummaryByCustomAreas();

	/**
	 * (督导)巡店任务执行率-特定大区的摘要汇总报表(根据自定义地理行政区域对该区域下属省市进行摘要汇总)
	 * @param paramMap 
	 */
	List<TaskPerformanceRate> storeVisitingTrackSummaryByCustomArea(String customAreaCode, Map<String, String> paramMap);

	/**
	 * (督导)巡店任务执行率-各省市摘要汇总报表(对全国所有省市进行摘要汇总)
	 */
	List<TaskPerformanceRate> storeVisitingTrackSummaryByProvinceALL(Map<String, String> paramMap);

	/**
	 * (督导)巡店任务执行率-摘要汇总报表(按特定省市进行摘要汇总)
	 * @param paramMap 
	 */
	List<TaskPerformanceRate> storeVisitingTrackSummaryByProvince(String provinceAdCode, Map<String, String> paramMap);

	/**
	 * (督导)巡店任务执行率-摘要汇总报表(按督导和特定城市进行摘要汇总)
	 * @param paramMap 
	 */
	List<SupervisorTaskPerformanceRate> storeVisitingTrackSummaryByCity(String cityAdCode, Map<String, String> paramMap);

	SellIntoRate sellIntoRateSummaryByCountry();

	List<SellIntoRate> sellIntoRateSummaryByProvince(String provinceAdCode);

	List<SellIntoRate> sellIntoRateSummaryByCity(String cityAdCode);

	List<SellIntoRate> sellIntoRateSummaryByProvinceALL();

	List<SellIntoRate> sellIntoRateSummaryByCustomAreas();

	List<SellIntoRate> sellIntoRateSummaryByCustomArea(String customAreaCode);

	
	List<Map<String, Object>> getPlannedOpenStoresListByCity(User user,int pageSize, String divCode, String projectCode);

	List<Map<String, Object>> findUserLoactions(String dateStart, String dateEnd, String loginName);

	List<SupervisorTaskPerformanceRate> employLastStoreVisitingTrack(String standardAdminDivAreaCode, Map<String, String> paramMap);
	
}
